package cn.readjava.bean;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Entity
@Table(name = "video_category", schema = "readjava", catalog = "")
public class VideoCategory implements Serializable {
    private long vcId;
    private String vcTitle;
    private String vcIcon;
    private String vcPrice;
    private String vcContent;
    private Integer vcState;

    @Id
    @Column(name = "vc_id", nullable = false)
    public long getVcId() {
        return vcId;
    }

    public void setVcId(long vcId) {
        this.vcId = vcId;
    }

    @Basic
    @Column(name = "vc_title", nullable = true, length = 255)
    public String getVcTitle() {
        return vcTitle;
    }

    public void setVcTitle(String vcTitle) {
        this.vcTitle = vcTitle;
    }

    @Basic
    @Column(name = "vc_icon", nullable = true, length = 255)
    public String getVcIcon() {
        return vcIcon;
    }

    public void setVcIcon(String vcIcon) {
        this.vcIcon = vcIcon;
    }

    @Basic
    @Column(name = "vc_price", nullable = true, length = 255)
    public String getVcPrice() {
        return vcPrice;
    }

    public void setVcPrice(String vcPrice) {
        this.vcPrice = vcPrice;
    }

    @Basic
    @Column(name = "vc_content", nullable = true, length = -1)
    public String getVcContent() {
        return vcContent;
    }

    public void setVcContent(String vcContent) {
        this.vcContent = vcContent;
    }

    @Basic
    @Column(name = "vc_state", nullable = true)
    public Integer getVcState() {
        return vcState;
    }

    public void setVcState(Integer vcState) {
        this.vcState = vcState;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        VideoCategory that = (VideoCategory) o;
        return vcId == that.vcId &&
                Objects.equals(vcTitle, that.vcTitle) &&
                Objects.equals(vcIcon, that.vcIcon) &&
                Objects.equals(vcPrice, that.vcPrice) &&
                Objects.equals(vcContent, that.vcContent) &&
                Objects.equals(vcState, that.vcState);
    }

    @Override
    public int hashCode() {

        return Objects.hash(vcId, vcTitle, vcIcon, vcPrice, vcContent, vcState);
    }
}
